/**
 * Node Class that forms the basic of data exchange
 */

public class Node{
	String date;
	String time;
	short cpu_user_p;
	short cpu_nice_p;
	short cpu_wait_p; 
	short cpu_irq_p;
	short cpu_soft_p; 
	int cpu_steal;
	int cpu_idle;
	int cpu_totl;
	int cpu_intrpt_psec;
	int	cpu_ctxt_psec;
	int	cpu_proc_psec;
	int cpu_proc_que;
	int	cpu_prc_run;
	int cpu_load_avg1;
	int	cpu_load_avg5;
	int	cpu_load_avg15;
	int	net_rx_pkt_total;
	int net_tx_pkt_total;
	int	net_rx_kb_tot;
	int	net_tx_kb_tot;
	int	net_rx_cmp_tot;
	int net_mlt_tot;
	int	net_tx_cmp_tot;
	int	net_rx_errs_tot;
	int	net_tx_err_tot;
	int dsk_read_tot;
	int	dsk_write_tot;
	int dsk_ops_tot;
	int	dsk_read_kb_tot;
	int	dsk_write_kb_tot;
	int	dsk_kb_tot;
	int	dsk_read_mrg_tot;
	int dsk_write_mrg_tot;
	int	dsk_mrg_tot;

	int value;
	Node nextNode;

	public boolean copyNodeData(Node node){
		if(node == null){
			return false;
		}
		node.date = new String(date.toString());
		node.time = new String(time.toString());
		node.cpu_user_p = cpu_user_p;
		node.cpu_nice_p = cpu_nice_p;
		node.cpu_wait_p = cpu_wait_p;
		node.cpu_irq_p = cpu_irq_p;
		node.cpu_soft_p = cpu_soft_p;
		node.cpu_steal = cpu_steal;
		node.cpu_idle = cpu_idle;
		node.cpu_totl = cpu_totl;
		node.cpu_intrpt_psec = cpu_intrpt_psec;
		node.cpu_ctxt_psec = cpu_ctxt_psec;
		node.cpu_proc_psec = cpu_proc_psec;
		node.cpu_proc_que = cpu_proc_que;
		node.cpu_prc_run = cpu_prc_run;
		node.cpu_load_avg1 = cpu_load_avg1;
		node.cpu_load_avg5 = cpu_load_avg5;
		node.cpu_load_avg15 = cpu_load_avg15;
		node.net_rx_pkt_total = net_rx_pkt_total;
		node.net_tx_pkt_total = net_tx_pkt_total;
		node.net_rx_kb_tot = net_rx_kb_tot;
		node.net_tx_kb_tot = net_tx_kb_tot;
		node.net_rx_cmp_tot = net_rx_cmp_tot;
		node.net_mlt_tot = net_mlt_tot;
		node.net_tx_cmp_tot= net_tx_cmp_tot;
		node.net_rx_errs_tot = net_rx_errs_tot;
		node.net_tx_err_tot = net_tx_err_tot;
		node.dsk_read_tot = dsk_read_tot;
		node.dsk_write_tot = dsk_write_tot;
		node.dsk_ops_tot = dsk_ops_tot;
		node.dsk_read_kb_tot = dsk_read_kb_tot;
		node.dsk_write_kb_tot = node.dsk_write_kb_tot;
		node.dsk_kb_tot = dsk_kb_tot;
		node.dsk_read_mrg_tot = dsk_read_mrg_tot;
		node.dsk_write_mrg_tot = dsk_write_mrg_tot;
		node.dsk_mrg_tot = dsk_mrg_tot;

		return true;
	}

	public Node(String str){
		System.out.println(str);
	}

	public Node(){
	}

}
